package com.mini.handler.column;

import com.mini.MiniColumnHandler;

import java.sql.ResultSet;
import java.sql.SQLException;

public class MiniByteColumnHandler implements MiniColumnHandler {

    @Override
    public boolean match(Class<?> propType) {
        return propType.equals(Byte.TYPE) || propType.equals(Byte.class);
    }

    @Override
    public Object apply(ResultSet resultSet, int columnIndex) throws SQLException {
        return resultSet.getByte(columnIndex);
    }
}
